home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Applications / HyperCuber 2.0 / source / CKeyControlsDirector.cp < prev    next >
Encoding:
Text File  |  1994-04-06  |  5.0 KB  |  25 lines  |  [TEXT/KAHL]

  1. );
  2.     long dismiss = DoModalDialog(cmdOK);
  3.     
  4.     if (dismiss == cmdOK)
  5.         {
  6.  
  7.         gPrefs->Lock(TRUE);
  8.         PrefsStruct *prefs = &(gPrefs->prefs);                    //  Get pointer to the current prefs
  9.         prefs->num_key_controls = array->GetNumItems();
  10.  
  11.         long i;
  12.         for (i = 0; i < prefs->num_key_controls; i++)
  13.             {
  14.             key_control_struct key_control;
  15.         
  16.             array->GetItem(&key_control, i + 1);                //  Get the key control
  17.             prefs->key_controls[i] = key_control;                //  Move this key control to prefs
  18.             }
  19.  
  20.         gPrefs->Lock(FALSE);
  21.         
  22.         }
  23.     
  24. }    //=== CKeyControlsDirector::TalkToUser ===\\
  25.